package com.itheima.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/*
* 响应
*       跳转
*       携带数据
*           1.Model
*           2.Map
*           3.ModelAndView
*           4.原生Servlet API(尽量少用--解耦)
* */
@Controller
@RequestMapping("resp")
public class RespController {

    public String test2(Model model){
        model.addAttribute("username","admin");//存储在request作用域

        return "resp";
    }


    @RequestMapping("test1")
    public String test1(){

        return "resp";
    }


}
